Skip to content

Conversation

@elianiva
Copy link

@elianiva elianiva commented Oct 3, 2025

Related GitHub Issue

Closes: #7892

Roo Code Task Context (Optional)

Description

This PR adds support for setting preferred profile for the terminal spawned by RooCode. The items are fetched from VSCode's setting so any user added profiles will be present.

Test Procedure

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

image

Documentation Updates

Additional Notes

Get in Touch

@elianiva


Important

Adds support for selecting a preferred terminal profile in RooCode, integrating with VSCode settings and updating terminal creation logic.

  • Behavior:
    • Adds terminalPreferredProfile setting in global-settings.ts to select a preferred terminal profile.
    • Integrates with VSCode terminal profiles, allowing users to choose a profile or use the default.
    • Updates ClineProvider.ts and Terminal.ts to apply the selected profile when creating terminals.
  • Services:
    • Introduces TerminalProfileService to manage terminal profiles, including fetching available profiles and configurations.
    • Provides methods to get default and specific profiles, and to configure terminal options based on profiles.
  • UI:
    • Updates SettingsView.tsx and TerminalSettings.tsx to include a dropdown for selecting terminal profiles.
    • Adds localization support for new settings in multiple language files.
  • Tests:
    • Adds TerminalProfileService.spec.ts to test profile fetching and configuration logic.

This description was created by Ellipsis for b348333. You can customize this summary. It will automatically update as commits are pushed.

@elianiva elianiva requested review from cte, jr and mrubens as code owners October 3, 2025 12:10
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Oct 3, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 3, 2025
Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention. Focused on aligning UI sentinel values and localization for the preferred terminal profile selector.

@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Oct 3, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Oct 3, 2025
@daniel-lxs daniel-lxs force-pushed the feat/terminal-profile branch from b348333 to e50523f Compare November 4, 2025 15:27
@roomote
Copy link

roomote bot commented Nov 4, 2025

See this task on Roo Code Cloud

Re-review completed. The latest commit only restores Korean translations lost during merge resolution. No new issues found. The 3 previously identified issues remain unresolved:

  • Fix misleading comment in Terminal.ts about conditional name/icon override
  • Add test coverage for empty string handling in TerminalProfileService
  • Align default option label between frontend ("Default (System)") and backend ("Default (VSCode Default)")
Previous Reviews

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

Comment on lines +43 to +45
// Keep our icon and name unless profile specifies otherwise
terminalOptions.name = "Roo Code"
terminalOptions.iconPath = iconPath
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Comment claims conditional override but code unconditionally sets values. The comment states "Keep our icon and name unless profile specifies otherwise" but lines 44-45 always override any profile-specified name/icon from the Object.assign on line 36. Either remove the "unless" clause from the comment or use conditional assignment like terminalOptions.name = profileOptions.name ?? "Roo Code".

Fix it with Roo Code or mention @roomote and request a fix.

shellArgs: ["--login"],
})
})
})
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P4] Missing test coverage for empty string equivalence. The code treats empty string and undefined as equivalent (line 150: if (preferredProfile) returns false for both "", null, and undefined) but no test verifies this critical sentinel behavior. Add a test case: getTerminalOptionsForRoo("") should return undefined (using VSCode default), not fall back to default profile.

Fix it with Roo Code or mention @roomote and request a fix.

<SelectValue placeholder="Select profile..." />
</SelectTrigger>
<SelectContent>
<SelectItem value="default">Default (System)</SelectItem>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P4] Label mismatch between frontend and backend. UI displays "Default (System)" but TerminalProfileService.getAllSelectableProfiles() returns "Default (VSCode Default)" (line 188). This creates inconsistency - either use the backend's label directly via availableProfiles.find(p => p.name === "")?.displayName or localize both to match.

Fix it with Roo Code or mention @roomote and request a fix.

@daniel-lxs
Copy link
Member

Thanks for working on this terminal profile feature! After testing it out with the team, we found a few issues that make it tricky to use in practice.

The main problem is that it shows all possible profiles even when they're not actually installed, and if you pick one that doesn't exist, commands just fail. Also since we switched to inline terminal as the default, it doesn't really work with that setup anymore.

Ideally something like this would only show profiles that are actually available, gracefully fall back when a profile goes missing, and work well with both inline and regular terminals. The current approach has some rough edges that make it not quite ready.

I'm going to close this for now, but definitely let me know if you want to take another shot at it with those things in mind. Happy to help brainstorm or review a different approach!

@daniel-lxs daniel-lxs closed this Nov 4, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Nov 4, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PR - Needs Preliminary Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Use VS Code automationProfile for spawned terminals (avoid default shell mismatch)

3 participants